<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML>
<html>
<head>
<jsp:include page="../../public/head.jsp"/>

<meta name="keywords" content="H-ui.admin v3.1,H-ui网站后台模版,后台模版下载,后台管理系统模版,HTML后台模版下载">
<meta name="description" content="H-ui.admin v3.1，是一款由国人开发的轻量级扁平化网站后台模板，完全免费开源的网站后台管理系统模版，适合中小型CMS后台系统。">
</head>
<body>
<article class="page-container">
	<form class="form form-horizontal" id="form-admin-add">
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>菜单名字：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="" placeholder="" id="name" name="name">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>创建人ID：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" autocomplete="off" value="" placeholder="密码" id="creater" name="creater">
		</div>
	</div>
	
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>链接地址：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" value="" placeholder="" id="href" name="href">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>排名：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" placeholder="" name="rink" id="rink">
		</div>
	</div>
	<div class="row cl">
		<label class="form-label col-xs-4 col-sm-3"><span class="c-red"></span>父菜单：</label>
		<div class="formControls col-xs-8 col-sm-9">
			<input type="text" class="input-text" placeholder="" name="pid" id="pid">
		</div>
	</div>
	<div class="row cl">
		<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
			<input class="btn btn-primary radius" id="submit" value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
		</div>
	</div>
	</form>
</article>

<!--_footer 作为公共模版分离出去--> 
<script type="text/javascript" src="http://res.easywan.info/public/hui/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="http://res.easywan.info/public/hui/lib/layer/2.4/layer.js"></script>
<script type="text/javascript" src="http://res.easywan.info/public/hui/static/h-ui/js/H-ui.min.js"></script> 
<script type="text/javascript" src="http://res.easywan.info/public/hui/static/h-ui.admin/js/H-ui.admin.js"></script> <!--/_footer 作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="http://res.easywan.info/public/hui/lib/jquery.validation/1.14.0/jquery.validate.js"></script> 
<script type="text/javascript" src="http://res.easywan.info/public/hui/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="http://res.easywan.info/public/hui/lib/jquery.validation/1.14.0/messages_zh.js"></script> 
<script type="text/javascript">
function submit(){
	var url = "/users/baseManagerMenueRes/add.html";
	var data = {
			name:$("#name").val(),
			creater:$("#creater").val(),
			href:$("#href").val(),
			rink:$("#rink").val(),
			pid:$("#pid").val(),
	};
	var params = {url:url,type:'post',dataType:'json',data:data,seccess:function(data){
		console.log(data)
		if(data.code == 0){
			alert(data.model);
			layer.msg(data.model,{icon:1,time:1000});
			
		}else{
			layer.msg(data.model,{icon:1,time:1000});
		}
		
	},error:function(data){
		console.log(data)
		if(data.code == 0){
			alert(data.model);
			layer.msg(data.model,{icon:1,time:1000});
			var index = parent.layer.getFrameIndex(window.name);
			parent.layer.close(index);
		}else{
			layer.msg(data.model,{icon:1,time:1000});
		}
	}}
	$.ajax(params);
	
}
$(function(){
	$("#submit").click(function(){submit();return false;});
});
</script> 
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>